package com.jeeboot.modules.app.entity;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;


/**
 * Created by IntelliJ IDEA.
 * 作者: 李哲训
 * 邮箱：370261528@qq.com
 * QQ群：571785017
 * 时间: 2017/11/29
 * 功能: 用户
 */

@Entity
@Table(name = "tb_user")
public class UserEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//用户ID
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long userId;
	//用户名
	@Size(max = 20)
	@NotBlank
	@Column(unique = true, nullable = false, length = 20)
	private String username;
	//手机号
	@Column
	private String mobile;
	//密码
	@Transient
	 private String password;
	//创建时间
	@Column
	private Date createTime;

	/**
	 * 设置：用户ID
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * 获取：用户ID
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * 设置：用户名
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * 获取：用户名
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * 设置：手机号
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * 获取：手机号
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * 设置：密码
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * 获取：密码
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
}
